﻿using System;
using System.Collections.Generic;
using System.Text;

namespace X3DLib
{
    public class Coordinate:X3DObject
    {
        private string Point;

        public Coordinate():base()
        {
        }

        public Coordinate(string point):base()
        {
            this.point = point;
        }

        public string point
        {
            get { return Point; }
            set { Point = value; }
        }

        public override string getAttrs()
        {
            return "DEF|" + this.DEF + "|string,"
                   + "USE|" + this.USE + "|string,"
                   + "point|" + this.point + "|string";
        }

        public override void setAttrs(string attrs)
        {
            string[][] temp = X3DString.getArrayByAttrs(attrs);
            for (int i = 0; i < temp.Length; i++)
            {
                switch (temp[i][0])
                {
                    case "DEF":
                        this.DEF = temp[i][1];
                        break;
                    case "USE":
                        this.USE = temp[i][1];
                        break;
                    case "point":
                        this.point = temp[i][1];
                        break;
                }
            }
        }
    }
}
